#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

int main()
{
    int n, max_len = 0, max_index = 0;
    char str[100][80], max_str[80];

    scanf("%d", &n);
    for (int i = 0; i < n; i++) 
    {
        scanf("%s", str[i]);
        int len = strlen(str[i]);
        if (len > max_len)
        {
            max_len = len;
            max_index = i;
        }
    }

    strcpy(max_str, str[max_index]);  
    printf("The longest is: %s\n", max_str);

    return 0;
}